Add code to dump out the glyph caches
authorMatthias Clasen <mclasen@redhat.com>
Sun, 2 Jun 2019 22:22:17 +0000 (22:22 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 3 Jun 2019 02:09:04 +0000 (02:09 +0000)
gsk/gl/gskglglyphcache.c

index 6e81b1b79366c7fc47ff386d7190591478d46501..8f80ac6552f00fde5b26852927a9ae96f8f61fdd 100644 (file)
@@ -446,4 +446,20 @@ gsk_gl_glyph_cache_begin_frame (GskGLGlyphCache *self)
     }
 
   g_hash_table_unref (removed);
+
+#if 0
+  for (i = 0; i < self->atlases->len; i++)
+    {
+      GskGLGlyphAtlas *atlas = g_ptr_array_index (self->atlases, i);
+
+      if (atlas->image)
+        {
+          char *filename;
+
+          filename = g_strdup_printf ("glyphatlas%d-%ld.png", i, self->timestamp);
+          gsk_gl_image_write_to_png (atlas->image, self->gl_driver, filename);
+          g_free (filename);
+        }
+    }
+#endif
 }